package com.yantong.mapper;

import com.yantong.pojo.bo.PrdStaticDataReqDto;
import com.yantong.pojo.vo.*;
import org.apache.ibatis.session.RowBounds;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface ReportMapper {
	List<ReportProductSaleVo> reportProductSale(HashMap<String, Object> map, RowBounds rowBounds);
	List<ReportProductSaleVo> reportProductSale(HashMap<String, Object> map);
	long countProductSale(HashMap<String, Object> map);


	List<ReportProductSaleListVo> reportProductSaleList(HashMap<String, Object> map, RowBounds rowBounds);
	List<ReportProductSaleListVo> reportProductSaleList(HashMap<String, Object> map);
	long countProductSaleList(HashMap<String, Object> map);
	Map<String,Object> countTotalProductSale(HashMap<String, Object> map);


	List<ReportMemberSaleVo> reportMemberSale(HashMap<String, Object> map, RowBounds rowBounds);
	List<ReportMemberSaleVo> reportMemberSale(HashMap<String, Object> map);
	long countMemberSale(HashMap<String, Object> map);

	List<ReportMemberRefundVo> reportMemberRefund(HashMap<String, Object> map, RowBounds rowBounds);
	List<ReportMemberRefundVo> reportMemberRefund(HashMap<String, Object> map);
	long countMemberRefund(HashMap<String, Object> map);


	List<ReportSingleSaleVo> reportSingleSale(HashMap<String, Object> map, RowBounds rowBounds);
	long countSingleSale(HashMap<String, Object> map);

	/**
	 * 商品库商品销售统计列表
	 * @param map
	 * @param rowBounds
	 * @return
	 * @author baolingyu
	 * @date 2018年11月20日-下午3:14:33
	 */
	List<ReportProductSaleListVo> reportProductbaseSale(HashMap<String, Object> map, RowBounds rowBounds);
	List<ReportProductSaleListVo> reportProductbaseSale(HashMap<String, Object> map);
	long countProductbaseSale(HashMap<String, Object> map);
	Map<String,Object> countTotalProductbaseSale(HashMap<String, Object> map);

	/**
	 * 门店团队业绩
	 * @param params
	 * @param rowBounds
	 * @return
     */
	List<ReportTmAchieveVo> tmAchieve(Map<String, Object> params, RowBounds rowBounds);

	/**
	 * 团队业绩 不分页
	 * @param params
	 * @return
	 */
	List<ReportTmAchieveVo> tmAchieve(Map<String, Object> params);

	/**
	 * 门店业绩统计个数
	 * @param params
	 * @return
     */
	int countTmAchieve(Map<String, Object> params);

	/**
	 * 商品库销量统计详情
	 * @param productSale
	 * @return
	 */
	List<ReportTmAchieveVo> reportProductSaleDetail(Map productSale);

	/**
	 * 得到商品规格
	 * @param queryMap
	 * @return
	 */
	String getSkuNameById(Map<String, Object> queryMap);


	Map<String,Object> countTotalProductSale2(HashMap<String, Object> map);

	ReportProductSaleListVo reportProductSaleList2(HashMap<String, Object> map);

	/**
	 * 前端用商户商品销量统计
	 * @param map
	 * @param rowBounds
	 * @return
	 */
	List<ReportProductSaleListVo> getReportProductSaleList(HashMap<String, Object> map, RowBounds rowBounds);

	/**
	 * 前端用商户商品销量总金额
	 * @param map
	 * @param rowBounds
	 * @return
	 */
	ReportProductSaleListVo getReportProductSaleTotal(HashMap<String, Object> map);

	/**
	 * 门店团队业绩
	 * @param params
	 * @param rowBounds
	 * @return
	 */
	List<ReportTmBillVo> tmBill(Map<String, Object> params, RowBounds rowBounds);

	/**
	 * 门店业绩统计个数
	 * @param params
	 * @return
	 */
	int countTmBill(Map<String, Object> params);

	/**
	 * 平台商品库数量
	 * @return
	 */
	int countProdstaticData(PrdStaticDataReqDto reqDto);

	/**
	 * 平台商品统计
	 * @param reqDto
	 * @param rowBounds
	 * @return
	 */
	List<ProdAfterSaleVo> prodstaticData(PrdStaticDataReqDto reqDto, RowBounds rowBounds);

	List<ProdAfterSaleVo> prodstaticData(PrdStaticDataReqDto reqDto);

	/**
	 * 统计平台销售总金额
	 * @param queryMap
	 * @return
	 */
	String countSalesAllAmt(Map<String, Object> queryMap);
	/**
	 * 统计平台售后总额
	 * @param queryMap
	 * @return
	 */
	String countSalesAfterAllAmt(Map<String, Object> queryMap);
	/**
	 * 统计单个商品销量
	 * @param id
	 * @return
	 */
	ProdTotalAndSalVo countSalVolusByProductId(Map<String,Object> queryMap);
	/**
	 * 单个统计商品售后信息
	 * @param queryMap
	 * @return
	 */
	ProdVoStatic coutProdAfterStatic(Map<String, Object> queryMap);


}
